import { ReactNode } from 'react';
import './index.less';

interface myTitleProps {
  children: string | ReactNode;
  size?: number;
}

const MyTitle: React.FC<myTitleProps> = (props) => {
  const { children } = props;
  const fontSize = props.size || 15;
  const backgroundColor = '#3E79FF';

  return (
    <div className="cardStatistic" style={{ fontSize }}>
      <span
        style={{
          backgroundColor,
          height: fontSize,
        }}
        className="text_pre_wrap"
      ></span>
      {children}
    </div>
  );
};

export default MyTitle;
